package com.omt.tarjimdinek.util;

import javax.inject.Named;

import org.springframework.context.annotation.Scope;
import org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices;

@Scope("session")
@Named("rememberMePostProcessor")
public class RememberMePostProcessor {

	public Object postProcessAfterInitialization(Object bean, String name) {
		if (bean instanceof AbstractRememberMeServices) {
			AbstractRememberMeServices rememberMe = (AbstractRememberMeServices) bean;
			rememberMe.setParameter("_spring_security_remember_me_input");
		}
		return bean;
	}

}
